package com.shadow.bus.main;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * Created by 张宇 on 2017/3/14.
 */

public class MainPagerAdapter extends FragmentStatePagerAdapter {
    private List<Fragment> mDelegates;
    private FragmentManager fm;
    private boolean[] flags;
    public MainPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.mDelegates = fragments;
        this.fm = fm;
    }

    @Override
    public Fragment getItem(int position) {
        return mDelegates.get(position);
    }

    @Override
    public int getCount() {
        return mDelegates.size();
    }

    @Override
    public int getItemPosition(Object object) {
        return POSITION_NONE;
    }
}
